//
//  TestView.m
//  MVP3
//
//  Created by 李煜 on 2024/6/21.
//

#import "TestView.h"
@implementation TestView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.TVLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 40, self.frame.size.width -40, self.frame.size.height -80)];
        self.TVLabel.backgroundColor = [UIColor orangeColor];
        self.TVLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:self.TVLabel];
    }
    return self;
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    if ([self.delegate respondsToSelector:@selector(doSomethings)]) {
        [self.delegate doSomethings];
    }
}

-(void)setName:(NSString *)name withimage:(UIImage *)image{
    // 可根据 M层 的数据进行 UI布局
}

@end
